/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.Test;

import com.View.PublikasiTableModel;
import com.model.Buku;
import com.model.Perpustakaan;
import com.model.Publikasi;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author admin
 */
public class TestPublikasiTabelModel1 {

    public static void main(String[] args) {
        
        Perpustakaan.DAFTAR_PUBLIKASI = new ArrayList<Publikasi>();
        Buku test11 = new Buku();
        try {
            test11.setIdKoleksi("1234567890");
            test11.setJudul("Pemrograman Java");
        } catch (Exception ex) {
            Logger.getLogger(TestPublikasiModel.class.getName()).log(Level.SEVERE, null, ex);
        }
        Buku test12 = new Buku();
        try {
            test12.setIdKoleksi("1234567891");
            test12.setJudul("Struktur Data");
        } catch (Exception ex) {
            Logger.getLogger(TestPublikasiModel.class.getName()).log(Level.SEVERE, null, ex);
        }
        Perpustakaan.DAFTAR_PUBLIKASI.add(test11);
        Perpustakaan.DAFTAR_PUBLIKASI.add(test12);
        PublikasiTableModel test2 = new PublikasiTableModel(Perpustakaan.DAFTAR_PUBLIKASI);
        System.out.println("idKoleksi :" + test2.getValueAt(0, 0) + " judul: " + test2.getValueAt(0, 1));
        System.out.println("idKoleksi :" + test2.getValueAt(1, 0) + " judul: " + test2.getValueAt(1, 1));
    }
}
